﻿using EasyHome.Models;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;

namespace EasyHome.DAL
{
    public class EasyHomeContext : DbContext
    {
        public EasyHomeContext() : base("DefaultConnection")
        {
        }

        public DbSet<Contacto> Contactos { get; set; }
        public DbSet<ContactoDato> DatosContacto { get; set; }
        public DbSet<TablaDato> TablasDatos { get; set; }
        public DbSet<TablaGenerica> TablasGenericas { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        }

        public System.Data.Entity.DbSet<EasyHome.Models.TablaAdicional> TablaAdicionals { get; set; }
    }
}